package cn.haoxsf.app.system.service.impl;

import cn.haoxsf.app.system.entity.FaultItem;
import cn.haoxsf.app.system.mapper.FaultItemMapper;
import cn.haoxsf.app.system.service.IFaultItemService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 故障详情 服务实现类
 * </p>
 *
 * @author Ele  qvbanfm@qq.com
 * @since 2020-03-15
 */
@Service
public class FaultItemServiceImpl extends ServiceImpl<FaultItemMapper, FaultItem> implements IFaultItemService {

    /**
     * CategoryId 所属下所有的
     *
     * @param id CategoryId
     * @return 结果
     */
    @Override
    public List<FaultItem> getListByCategoryId(String id) {
        return this.baseMapper.selectList(new QueryWrapper<FaultItem>().eq("category_id",id));
    }

    /**
     * 批量查询
     *
     * @param ids
     * @return 结果
     */
    @Override
    public List<Map<String, Object>> getListByIds(String[] ids) {
        return baseMapper.getListByIds(ids);
    }
}
